package com.ww.util.jwt;

import com.auth0.jwt.interfaces.DecodedJWT;

import java.util.HashMap;
import java.util.Map;

public class JwtDemo {

    public static void main(String[] args) {
        Map<String, String> payload = new HashMap<>();
        payload.put("userId", "1335");
        payload.put("username", "张三");

        String token = JwtUtils.getToken(payload);
        JwtUtils.verify(token);
        DecodedJWT decodedJWT = JwtUtils.parseToken(token);
        JwtUtils.parse(decodedJWT);
    }
}
